#ifndef QEDITABLEFIELD_H
#define QEDITABLEFIELD_H

#include <QWidget>
#include "ui_qeditablefield.h"
#include "exp_define.h"

class QEditableField : public QWidget
{
   Q_OBJECT

public:
   QEditableField (QString title = QString() ,QString value = QString() ,QWidget *parent = 0);
   ~QEditableField ();

   QString value() const { return "\""+ui.field->text()+"\""; }
   void set(QString title = QString() ,QString value = QString());
public slots:
	void accepted();
	void refused();
	void editState();

signals:
	void hasChanged(const QString& value);
private:
	void normalState();
	
   Ui::QEditableFieldClass ui;
   QString m_save;
   QString m_normalizedValue;
};

#endif
